<template>
  <div class="classification">
    <my-header ischeck="classification"></my-header>
    <div class="content">
    <div class="left"><left-nav ischecked='classification'></left-nav></div>
    <div class="right"><variety ischecked='classification'></variety></div></div>
  </div>
</template>

<script>
  import leftNav from '../components/left-nav.vue'
  import variety from '../components/variety.vue'
  export default{
    components:{
      'left-nav':leftNav,
      'variety':variety
    },
    methods:{
            getKind(item){
        console.log(item)
        this.axios.get('classification',{
          params:{
          kindName:item
        }
        }).then(res=>{
          console.log(res.data)
          let shop = res.data.data
          this.$store.commit('shop',shop)
        })
      }
    },
    created() {
      //获取分类数据
      this.getKind('p2000')
    }
  }
</script>

<style>
  .classification{
  height: 100%;
  overflow-y: hidden;
  }
  .content{
    display: flex;
  }
  .left{
    width: 20%;
  }
   .right{
     width: 80%;
   }
</style>
